<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Facial Analyse</title>

    <!-- Bootstrap -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style>
        .btn-file {
            position: relative;
            overflow: hidden;
        }
        .btn-file input[type=file] {
            position: absolute;
            top: 0;
            right: 0;
            min-width: 100%;
            min-height: 100%;
            font-size: 100px;
            text-align: right;
            filter: alpha(opacity=0);
            opacity: 0;
            outline: none;
            background: white;
            cursor: inherit;
            display: block;
        }
    </style>
  </head>
  <body>
    <nav class="navbar navbar-default">
        <div class="container">
            <div class="navbar-header">
                <h3>人脸属性分析</h3>
            </div>
        </div>
    </nav>
    <div class="container">
        <div>
            <form action="/" class="from-inline" method="post" enctype="multipart/form-data">
                <div class="form-group col-md-6">
                    <label class="sr-only" for="url">URL</label>
                    <input type="text" name="url" class="form-control" id="url" placeholder="image url">
                </div>
                <div class="form-group col-md-1">
                    <span class="btn btn-default btn-file">浏览图片<input type="file" name="file" accept="image/*"></span>
                </div>
                <div class="form-group col-md-1">
                    <button type="submit" class="btn btn-primary">提交</button>
                </div>
            </form>
        </div>
        <div class="col-md-8">
            {% if image %}
            <img src="/media/result/{{ image }}" alt="">
            {% endif %}
        </div>
    </div>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="/static/js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/static/js/bootstrap.min.js"></script>
  </body>
</html>
